'use strict';

const log = require('npmlog')

// 通过环境变量配置log级别 silly verbose info timing http notice warn error silent
log.level = process.env.LOG_LEVEL ? process.env.LOG_LEVEL : 'info'

log.heading = 'ting-cli-dev:' // 修改前缀
log.headingStyle = {bg: 'grey',}
// 添加自定义命令 success 级别2000 定义样式
log.addLevel('success', 2000, {fg: 'green', bold: true})

module.exports = log;